<style>

    .select2-container--krajee{
        width:220px!important;
    }
</style>
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/22
 * Time: 16:19
 */

return [
    'id'=>'channeldistribution-form',
    'template'=>'form_default',
    'enableClientValidation'=>false,
    'enableAjaxValidation'=>true,
    'options'=>[
        'class'=>'',
    ],
    'models'=>[
        'channeldistribution'=>[
            'title'=>'渠道管理',
            'th_with'=>80,
            'elements'=>[
                'name'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'contacts'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'mobile'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'admin_id'=>[
                    'type'=>'widget',
                    'class'=> \kartik\select2\Select2::className(),
                    'data' => \yii\helpers\ArrayHelper::map(\zhtfrontend\models\datas\Admin::find()->where(['role'=>'class_teacher'])->all(),'id','name'),
                    'options' => ['placeholder' => '请选择...'],
                ],
            ],
        ]
    ]
];